import java.io.FileNotFoundException;
import java.io.FileReader;

/**
 * Created by dell on 2017/8/7.
 */
public class FileReadTest {
    public static void main(String[] args) throws FileNotFoundException {
        try {
            FileReader fr = new FileReader("\\IdeaProjects\\IO\\src\\FileReadTest.java");
            char[] c = new char[32];
            int hasRead = 0;
            while ((hasRead = fr.read(c)) > 0) {
                System.out.println(new String(c, 0, hasRead));
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
